package org.subside.MQ.util.commonConfig;


import lombok.Data;

/**
 * @Author : zhangbo
 * @data : 2024/4/13
 * @description :
 */
//@ApiEnum
public enum CodeEnum {

    SIMPLE_QUEUE(1, "简单队列模式"),
    WORK_QUEUE(2, "work队列模式"),
    PUB_MODEL(3, "发布订阅模式"),
    ROUTING_MODEL(4, "routing模式"),
     TOPICS_MODEL(5, "topics模式"),
    RPC_MODEL(6, "RPC模式");

    /**
     * 结果码值
     */
    private final Integer code;

    /**
     * 描述
     */
    private final String description;

    CodeEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

//    public static ErrorCodeEnum getByValue(String code) {
//        for (ErrorCodeEnum result : values()) {
//            System.out.println(result.ordinal());
//            if (StringUtils.equals(result.getCode().toString(), code)) {
//                return result;
//            }
//        }
//        return null;
//    }

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}